home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Tools&Utilities / EnterAct Stuff / Documentation / About Minimal App7 next >
Text File  |  1996-06-14  |  3KB  |  66 lines

  1. - - - - - - - - - -
  2. About Minimal App7
  3. - - - - - - - - - -
  4. "Minimal App7" (MA7) is an application whose only purpose in life is
  5. to run hAWK programs. There are two ways to run a hAWK program
  6. using MA7:
  7.     • start MA7, then pick "hAWK'" from the menu
  8.     • put a hAWK command line on the clipboard, and then start
  9.     MA7: it will then run the corresponding hAWK program using
  10.     the command line, with no setup dialog.
  11.  
  12. MA7 must be beside the "Drag_on Modules" folder at the same level
  13. in order to run hAWK programs.
  14.  
  15. If MA7 runs a hAWK command line, it will quietly quit when
  16. the program is done. If you run the program by using the hAWK
  17. setup dialog, you will hear a beep when it is done.
  18.  
  19. To terminate a running hAWK program, either type
  20. <command><period> or quit MA7 (that includes sending MA7
  21. a "quit" event with an AppleScript). MA7 does not have a
  22. key command for Quit, since quitting terminates any
  23. running hAWK program.
  24.  
  25. You can use an AppleScript to start MA7, and if there is a
  26. hAWK command line on the system clipboard it will be run.
  27. An entire script to get things going would look like
  28. ____
  29. tell application "Disk:and:folders:Minimal App7"
  30. run
  31. end tell
  32. set result to "whatever you want or nothing"
  33. ____
  34. A version of this script, for use with EnterAct, is included
  35. in the (EnterAct Scripts) folder. It's called "Clip->Minimal App 7".
  36. Before you try it, open the script with Script Editor and change
  37. the path to Minimal App7 (I put a full path in so the script
  38. wouldn't pester me about locating Minimal App7).
  39.  
  40. hAWK is a Mac implementation of AWK.
  41. A hAWK command line looks like this at its simplest:
  42.     hAWK -f$ProgramName
  43. If you'd like to know more about hAWK, see appendices 1 and 2
  44. in the "EnterAct 3 Manual", and then browse your way into the
  45. "hAWK User’s Manual".
  46.  
  47. MA7 supports getclip() and putclip(), but putclip() has an effect
  48. only if MA7 is the front application at the time of the call.
  49.  
  50. You might use MA7 to run a lengthy hAWK program WAY in the
  51. background. Or (this notion is untested) use it as a CGI
  52. application: you would put a hAWK command line on the
  53. (system) clipboard using ZeroScrap()/PutScrap(), launch
  54. MA7, and then monitor things until the program is done.
  55. Monitoring could be done three ways:
  56.     • detect when MA7 quits (through for example accepting
  57.     "child died" events)
  58.     • monitor a specific file for changes
  59.     • have your hAWK program use putclip(string) to change
  60.     the system clipboard: HOWEVER, your AppleScript would
  61.     have to tell MA7 to activate (only an active application
  62.     can change the system scrap, as a rule). Note that the
  63.     script "Clip->Minimal App 7" just says run, not activate.
  64.     
  65.  
  66.